<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no">
  <meta name="description" content="API docs for the Symbol constructor from the Class Symbol class from the dart:core library, for the Dart programming language.">
  <title>Symbol constructor - Symbol class - dart:core library - Dart API</title>
  <!-- required because all the links are pseudo-absolute -->
  <base href="../..">

  <link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500,400i,400,300|Source+Sans+Pro:400,300,700" rel="stylesheet">
  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
  <link rel="stylesheet" href="static-assets/github.css">
  <link rel="stylesheet" href="static-assets/styles.css">
  <link rel="icon" href="static-assets/favicon.png">
  <!-- header placeholder -->
</head>

<body>

<div id="overlay-under-drawer"></div>

<header id="title">
  <button id="sidenav-left-toggle" type="button">&nbsp;</button>
  <ol class="breadcrumbs gt-separated dark hidden-xs">
    <li><a href="index.html">flutter_form_builder</a></li>
    <li><a href="dart-core/dart-core-library.html">dart:core</a></li>
    <li><a href="dart-core/Symbol-class.html">Symbol</a></li>
    <li class="self-crumb">Symbol const constructor</li>
  </ol>
  <div class="self-name">Symbol</div>
  <form class="search navbar-right" role="search">
    <input type="text" id="search-box" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
  </form>
</header>

<main>

  <div id="dartdoc-sidebar-left" class="col-xs-6 col-sm-3 col-md-2 sidebar sidebar-offcanvas-left">
    <header id="header-search-sidebar" class="hidden-l">
      <form class="search-sidebar" role="search">
        <input type="text" id="search-sidebar" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
      </form>
    </header>
    
    <ol class="breadcrumbs gt-separated dark hidden-l" id="sidebar-nav">
      <li><a href="index.html">flutter_form_builder</a></li>
      <li><a href="dart-core/dart-core-library.html">dart:core</a></li>
      <li><a href="dart-core/Symbol-class.html">Symbol</a></li>
      <li class="self-crumb">Symbol const constructor</li>
    </ol>
    
    <h5>Symbol class</h5>
    <ol>
    
      <li class="section-title"><a href="dart-core/Symbol-class.html#constructors">Constructors</a></li>
      <li><a href="dart-core/Symbol/Symbol.html">Symbol</a></li>
    
      <li class="section-title">
        <a href="dart-core/Symbol-class.html#instance-properties">Properties</a>
      </li>
      <li><a href="dart-core/Symbol/hashCode.html">hashCode</a></li>
      <li class="inherited"><a href="dart-core/Object/runtimeType.html">runtimeType</a></li>
    
      <li class="section-title inherited"><a href="dart-core/Symbol-class.html#instance-methods">Methods</a></li>
      <li class="inherited"><a href="dart-core/Object/noSuchMethod.html">noSuchMethod</a></li>
      <li class="inherited"><a href="dart-core/Object/toString.html">toString</a></li>
    
      <li class="section-title"><a href="dart-core/Symbol-class.html#operators">Operators</a></li>
      <li><a href="dart-core/Symbol/operator_equals.html">operator ==</a></li>
    
    
    
      <li class="section-title"><a href="dart-core/Symbol-class.html#constants">Constants</a></li>
      <li><a href="dart-core/Symbol/empty-constant.html">empty</a></li>
      <li><a href="dart-core/Symbol/unaryMinus-constant.html">unaryMinus</a></li>
    
    </ol>
  </div><!--/.sidebar-offcanvas-left-->

  <div id="dartdoc-main-content" class="col-xs-12 col-sm-9 col-md-8 main-content">
      <div><h1><span class="kind-constructor">Symbol</span> constructor</h1></div>

    <section class="multi-line-signature">
      const
      <span class="name ">Symbol</span>(<wbr><span class="parameter" id="-param-name"><span class="type-annotation"><a href="dart-core/String-class.html">String</a></span> <span class="parameter-name">name</span></span>)
    </section>

    <section class="desc markdown">
      <p>Constructs a new <a href="dart-core/Symbol-class.html">Symbol</a> representing the provided name.</p>
<p>The name must be a valid public Dart member name,
public constructor name, or library name, optionally qualified.</p>
<p>A qualified name is a valid name preceded by a public identifier name
and a '<code>.</code>', e.g., <code>foo.bar.baz=</code> is a qualified version of <code>baz=</code>.
That means that the content of the <code>name</code> String must be either</p>
<ul>
<li>a valid public Dart identifier
(that is, an identifier not starting with "<code>_</code>"),</li>
<li>such an identifier followed by "=" (a setter name),</li>
<li>the name of a declarable operator
(one of "<code>+</code>", "<code>-</code>", "<code>*</code>", "<code>/</code>", "<code>%</code>", "<code>~/</code>", "<code>&amp;</code>", "<code>|</code>",
"<code>^</code>", "<code>~</code>", "<code>&lt;&lt;</code>", "<code>&gt;&gt;</code>", "<code>&lt;</code>", "<code>&lt;=</code>", "<code>&gt;</code>", "<code>&gt;=</code>", "<code>==</code>",
"<code>[]</code>", "<code>[]=</code>", or "<code>unary-</code>"),</li>
<li>any of the above preceded by any number of qualifiers,
where a qualifier is a non-private identifier followed by '<code>.</code>',</li>
<li>or the empty string (the default name of a library with no library
name declaration).</li>
</ul>
<p>Symbol instances created from the same <code>name</code> are equal,
but not necessarily identical, but symbols created as compile-time
constants are canonicalized, as all other constant object creations.</p>
<pre class="language-dart"><code class="language-dart">assert(new Symbol("foo") == new Symbol("foo"));
assert(identical(const Symbol("foo"), const Symbol("foo")));
</code></pre>
<p>If <code>name</code> is a single identifier that does not start with an underscore,
or it is a qualified identifier,
or it is an operator name different from <code>unary-</code>,
then the result of <code>const Symbol(name)</code> is the same instance that
the symbol literal created by prefixing <code>#</code> to the content of <code>name</code>
would evaluate to.</p>
<pre class="language-dart"><code class="language-dart">assert(new Symbol("foo") == #foo);
assert(new Symbol("[]=") == #[]=]);
assert(new Symbol("foo.bar") == #foo.bar);
assert(identical(const Symbol("foo"), #foo));
assert(identical(const Symbol("[]="), #[]=));
assert(identical(const Symbol("foo.bar"), #foo.bar));
</code></pre>
<p>This constructor cannot create a <a href="dart-core/Symbol-class.html">Symbol</a> instance that is equal to
a private symbol literal like <code>#_foo</code>.</p>
<pre class="language-dart"><code class="language-dart">const Symbol("_foo") // Invalid
</code></pre>
<p>The created instance overrides <a href="dart-core/Object/operator_equals.html">Object.==</a>.</p>
<p>The following text is non-normative:</p>
<p>Creating non-const Symbol instances may result in larger output.  If
possible, use <code>MirrorsUsed</code> from "dart:mirrors" to specify which names
might be passed to this constructor.</p>
    </section>
    
    <section class="summary source-code" id="source">
      <h2><span>Implementation</span></h2>
      <pre class="language-dart"><code class="language-dart">const factory Symbol(String name) = internal.Symbol;</code></pre>
    </section>

  </div> <!-- /.main-content -->

  <div id="dartdoc-sidebar-right" class="col-xs-6 col-sm-6 col-md-2 sidebar sidebar-offcanvas-right">
  </div><!--/.sidebar-offcanvas-->

</main>

<footer>
  <span class="no-break">
    flutter_form_builder
      3.8.2
  </span>

  <!-- footer-text placeholder -->
</footer>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="static-assets/typeahead.bundle.min.js"></script>
<script src="static-assets/highlight.pack.js"></script>
<script src="static-assets/URI.js"></script>
<script src="static-assets/script.js"></script>
<!-- footer placeholder -->

</body>

</html>
